package com.onewo.arthasdemo.aspect;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class ServiceLogAspect {

    @Pointcut("execution(public * com.onewo.arthasdemo.service.EchoService.*(..)))")
    public void ServiceLogAspect(){};

    @Before("ServiceLogAspect()")
    public void before(){
        System.out.println(" aspect before xxx .......");
    }

    @After("ServiceLogAspect()")
    public void after(){
        System.out.println(" aspect after xxx.......");
    }

}
